Skip to content

Add full Lambda service plugin with CRUD, triggers, and documentation#2

Merged
fgiova merged 4 commits intomainfrom
feature/lambda-plugin
Apr 2, 2026
Merged

Add full Lambda service plugin with CRUD, triggers, and documentation#2
fgiova merged 4 commits intomainfrom
feature/lambda-plugin

Conversation

@fgiova
Copy link
Copy Markdown
Owner

@fgiova fgiova commented Apr 2, 2026

This pull request adds comprehensive support for AWS Lambda to the LocalStack Explorer project. Lambda is now a fully integrated service, with backend support, API endpoints, UI documentation, and configuration updates. The changes also update the project to require Node.js 24+, and make several improvements to documentation and service management.

Lambda Service Integration

  • Backend Lambda Support:
    • Adds @aws-sdk/client-lambda as a dependency and integrates LambdaClient into the AWS client cache (client-cache.ts). [1] [2] [3] [4]
    • Implements the Lambda service plugin with route registration (packages/backend/src/plugins/lambda/index.ts).
    • Updates the plugin bundle to explicitly load the Lambda plugin. [1] [2]
    • Adds Lambda to the list of enabled/configurable services in the backend configuration. [1] [2]

Documentation and User Guide Updates

  • README and Service Guide:
    • Updates the README to document Lambda as a fully implemented service, including its features, environment variables, and service enablement instructions. [1] [2] [3] [4] [5] [6] [7]
    • Adds a detailed docs/lambda.md with endpoint documentation, request/response examples, error handling, UI component descriptions, and backend architecture.

Configuration and Deployment

  • Service Enablement:
    • Updates all relevant configuration defaults, environment variable docs, and Docker Compose files to include Lambda as a standard enabled service. [1] [2] [3]
    • Updates the LocalStack Explorer image tag for testing.

Project Requirements

  • Node.js Version Update:
    • Increases the minimum required Node.js version from 20 to 24 in the documentation.

Service Health and UI Improvements

  • Active Service Detection:
    • Documents new health endpoint usage and UI logic to visually disable services that are configured but not running, including Lambda.

These changes collectively enable full Lambda management in LocalStack Explorer, aligning it with other AWS services already supported in the application.

fgiova and others added 3 commits April 2, 2026 19:06
… aliases

Implement a complete Lambda plugin following the established service pattern,
covering both backend and frontend.

Backend:
- Add "lambda" to ALL_SERVICES and ENABLED_SERVICES in config.ts
- Add LambdaClient to client-cache.ts and @aws-sdk/client-lambda dependency
- Create plugins/lambda/ with schemas, service, routes, and index
- LambdaService: listFunctions, getFunction, createFunction, updateCode,
  updateConfig, deleteFunction, invokeFunction, listVersions, listAliases
- 9 Fastify routes (GET/POST/PUT/DELETE) with TypeBox validation
- Register lambda in bundle.ts plugin map
- Add lambda to docker-compose.yaml SERVICES

Frontend:
- Add React Query hooks for all Lambda operations (api/lambda.ts)
- Add route pages: /lambda/ (list) and /lambda/$functionName (detail)
- FunctionList: searchable table with create dialog and delete confirmation
- FunctionDetail: 4-tab view (Configuration, Invoke, Versions, Aliases)
- FunctionCreateDialog: form with runtime selector and zip upload
- InvokeFunctionForm: payload editor, invocation type, result display with
  decoded logs
- Add Lambda entry (Zap icon) to Sidebar and Dashboard

Tests:
- Unit tests for LambdaService (49 tests) and routes (24 tests)
- Plugin index registration test
- Integration test with full CRUD flow against LocalStack
- Update config.test.ts and plugin-index.test.ts for lambda

Documentation:
- Create docs/lambda.md with API reference, examples, and UI guide
- Update README.md: services table, ENABLED_SERVICES, project structure,
  Node.js 24 prerequisite, active service detection section
…d resource policy detection

The Lambda function detail view now includes a Triggers tab that combines
two data sources into a unified view:

- Resource-based policy triggers (S3, SNS, API Gateway, EventBridge, etc.)
  parsed from the function's resource policy via GetPolicy. These appear as
  a read-only table showing the invoking service, source ARN, and policy
  statement ID.

- Event source mappings (SQS, DynamoDB Streams, Kinesis) fetched via
  ListEventSourceMappings, with support for creating new mappings and
  deleting existing ones through the UI.

Backend:
- Add getFunctionTriggers (combines listEventSourceMappings + getResourcePolicyTriggers)
- Add createEventSourceMapping and deleteEventSourceMapping to LambdaService
- Add GET /:functionName/triggers, POST /:functionName/event-source-mappings,
  DELETE /event-source-mappings/:uuid routes
- Add TypeBox schemas for triggers, policy triggers, and create response

Frontend:
- Add useFunctionTriggers, useCreateEventSourceMapping, useDeleteEventSourceMapping hooks
- Add TriggersTab component with two-section layout, inline create form,
  and delete confirmation dialog

Tests:
- Service unit tests: +16 (event source mappings CRUD, policy parsing, combined triggers)
- Routes unit tests: +7 (GET triggers, POST/DELETE event-source-mappings)
- Integration tests: +4 (list/create/list/delete triggers against LocalStack)
- Add lambda to test container SERVICES list
- Add retry logic with extended timeouts for Lambda integration tests
  (LocalStack needs up to ~40s for functions to become Active)

Documentation:
- Update docs/lambda.md with triggers API, examples, error codes, and UI description
- Update README.md Lambda service description
@fgiova fgiova force-pushed the feature/lambda-plugin branch from 296bb3c to 1d40e01 Compare April 2, 2026 21:09
@fgiova fgiova merged commit c8cc60c into main Apr 2, 2026
2 checks passed
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

🎉 This PR is included in version 1.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant